﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.ModelBinding;
using demo.Entity;
using demo.Service;
using iAgileFramework.DataTransCarrier;

namespace demo.BLL
{
    public class WebSiteInfoBLL:BLLBase
    {
        public WebSiteInfoService service = new WebSiteInfoService();

        /// <summary>
        /// 新增
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public ReturnValue Add(WebSiteInfo model)
        {
            var rv = new ReturnValue();            
            return service.Add(model) > 0 ? rv.Success("操作成功！") : rv.Fail("操作失败！");
        }

        /// <summary>
        /// 修改
        /// </summary>
        /// <param name="model">实体</param>
        /// <returns></returns>
        public ReturnValue Update(WebSiteInfo model)
        {
            var rv = new ReturnValue();
            return service.Update(model)? rv.Success("操作成功！") : rv.Fail("操作失败！");
        }

        /// <summary>
        /// 获得实体
        /// </summary>
        /// <returns></returns>
        public WebSiteInfo GetModel()
        {
            return service.GetModel();
        }
    }
}
